#define _CRT_SECURE_NO_WARNINGS 1
bool isPalindrome(int x) {
	long int r = 0;
	int y = x;
	if (x == 0)
		return true;
	if (x < 0 || x % 10 == 0)
		return false;
	else
	{
		while (x)
		{
			r = 10 * r + x % 10;
			x = x / 10;
		}
		if (r == y)
			return true;
		else
			return false;
	}
}